<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>mysql集群 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Replication原理　　首先打开Master端的Binary Log功能（通过在启动命令中使用“—log-bin” 参数，或者在my.cnf配置文件中的mysqld参数组（[mysqld]标识后的参数部分）增加“log-bin” 参数项。）　　在Master与Slave之间，整个复制过程主要由三个线程来完成，其中两个线程（Sql线程和IO线程）在Slave 端， 另外一个线程（IO线程）在M">
<meta property="og:type" content="article">
<meta property="og:title" content="mysql集群">
<meta property="og:url" content="http://yoursite.com/2016/01/22/database/5.mysql集群/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="Replication原理　　首先打开Master端的Binary Log功能（通过在启动命令中使用“—log-bin” 参数，或者在my.cnf配置文件中的mysqld参数组（[mysqld]标识后的参数部分）增加“log-bin” 参数项。）　　在Master与Slave之间，整个复制过程主要由三个线程来完成，其中两个线程（Sql线程和IO线程）在Slave 端， 另外一个线程（IO线程）在M">
<meta property="og:image" content="http://yoursite.com/images/master-slaves-slaves.png">
<meta property="og:image" content="http://yoursite.com/images/master-master-slaves.png">
<meta property="og:updated_time" content="2016-01-29T17:47:36.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="mysql集群">
<meta name="twitter:description" content="Replication原理　　首先打开Master端的Binary Log功能（通过在启动命令中使用“—log-bin” 参数，或者在my.cnf配置文件中的mysqld参数组（[mysqld]标识后的参数部分）增加“log-bin” 参数项。）　　在Master与Slave之间，整个复制过程主要由三个线程来完成，其中两个线程（Sql线程和IO线程）在Slave 端， 另外一个线程（IO线程）在M">
  
    <link rel="alternative" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  

</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-database/5.mysql集群" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2016/01/22/database/5.mysql集群/" class="article-date">
  <time datetime="2016-01-22T06:23:00.000Z" itemprop="datePublished">2016-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/database/">database</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      mysql集群
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="Replication_u539F_u7406"><a href="#Replication_u539F_u7406" class="headerlink" title="Replication原理"></a>Replication原理</h2><p>　　首先打开Master端的Binary Log功能（通过在启动命令中使用“—log-bin” 参数，或者在my.cnf配置文件中的mysqld参数组（[mysqld]标识后的参数部分）增加“log-bin” 参数项。）<br>　　在Master与Slave之间，整个复制过程主要由三个线程来完成，其中两个线程（Sql线程和IO线程）在Slave 端， 另外一个线程（IO线程）在Master 端。 </p>
<h2 id="u590D_u5236_u8FC7_u7A0B"><a href="#u590D_u5236_u8FC7_u7A0B" class="headerlink" title="复制过程"></a>复制过程</h2><p>　　1. Slave的IO线程连接上Master后，请求从指定日志文件的指定位置之后的日志内容；<br>　　2. Master收到Slave的IO线程的请求后，通过负责复制的IO线程<strong>根据请求信息读取指定日志指定位置之后的日志信息</strong>，返回给Slave 端的IO线程。返回信息中除了日志所包含的信息之外，还包括本次返回的信息在Master端的Binary Log文件的名称以及在Binary Log 中的位置；<br>　　3. Slave的IO线程接收到信息后，将接收到的日志内容依次写入到Slave端的Relay Log文件(mysql-relay-bin.xxxxxx)的最末端，并将读取到的Master端的binlog的文件名和位置记录到master-info文件中。<br>　　4. Slave的SQL线程检测到Relay Log中新增加了内容后，会解析该Log文件中的内容，还原成在Master端执行时的那些Query 语句，并在自身执行。这样，实际上就是在Master端和Slave端执行了同样的Query，所以两端的数据是完全一样的。<br>　　由于复制是异步的，只要数据的更改不是在一个事务中，都可能导致数据丢失（master挂了，但是slave还有部分数据没有同步）</p>
<h2 id="Replication_u7EA7_u522B"><a href="#Replication_u7EA7_u522B" class="headerlink" title="Replication级别"></a>Replication级别</h2><p>　　基于语句（Statement Level）、基于记录（Row level）和Mixed Level（前两种模式的结合）三种模式，可以在MySQL 的配置参数中设置，不同的设置会影响Binary Log记录成不同的形式。 </p>
<h4 id="Row_Level"><a href="#Row_Level" class="headerlink" title="Row Level"></a>Row Level</h4><p>　　Binary Log中会记录成每条数据被修改的形式，然后在Slave端再对相同的数据进行修改。<br>　　优点：Binary Log中可以不记录执行sql语句的上下文相关的信息，只记录哪条记录被修改成什么样了。所以Row Level的日志 内容会记录下每条数据被修改的细节。不会出现某些特定情况，比如存储过程、function和trigger的调用和触发无法被正确复制的问题。<br>　　缺点：一条sql，比如update可能会产生大量的日志内容（这条语句更新的每条记录的变化情况单独记录）自然，Binary Log日志的量就会很大。尤其是当执行ALTER TABLE 之类的语句的时候。因为MySQL对于ALTER TABLE之类的DDL的处理方式是<strong>重建整个表的所有数据，也就是说表中的每一条记录都需要变动</strong>，那么该表的每一条记录都会被记录到日志中。</p>
<h4 id="Statement_Level"><a href="#Statement_Level" class="headerlink" title="Statement Level"></a>Statement Level</h4><p>　　每一条修改数据的Query都会记录到Binary Log中。Slave在复制的时候SQL线程会解析成和原来Master端执行过的相同的Query来再次执行。<br>　　优点：解决了Row Level的缺点，不需要记录每条数据的变化，减少Binary Log日志量，节约了IO成本。因为只需要记录在Master上执行的语句的细节和上下文的信息。<br>　　缺点：在使用某些特定的函数或功能时会出现问题，比如：sleep()函数在有些版本中就不能真确复制，在存储过程中使用了last_insert_id()函数，可能会使slave和master上得到不一致的id等等。由于row level是基于每一行来记录的变化，所以不会出现类似的问题。</p>
<h4 id="Mixed_Level"><a href="#Mixed_Level" class="headerlink" title="Mixed Level"></a>Mixed Level</h4><p>　　在Mixed模式下，MySQL根据执行的每一条具体的Query语句来区分对待记录的日志形式，也就是在Statement和Row之间选择一种。新版本的Row Level模式并不是所有的修改都会以Row Level来记录，像遇到表结构变更的时候就会以statement模式来记录，如果Query语句确实就是UPDATE 或者DELETE 等修改数据的语句，那么还是会记录所有行的变更。</p>
<h2 id="master-slave"><a href="#master-slave" class="headerlink" title="master-slave"></a>master-slave</h2><p>　　支持一主多从的配置。在Master端并不Care有多少个Slave连上了，只要有Slave的IO线程通过了连接认证，并请求指定位置之后的Binary Log信息，就会按照该IO线程的要求，读取自己的Binary Log信息，返回给Slave的IO线程。<br>　　注意：暂时还不支持一个Slave节点从多个Master节点来进行复制的架构，主要是为了避免冲突的问题，防止多个数据源之间的数据出现冲突，而造成最后数据的不一致性。</p>
<h2 id="master-master_u914D_u7F6E"><a href="#master-master_u914D_u7F6E" class="headerlink" title="master-master配置"></a>master-master配置</h2><p>　　1. 打开Master端Binary Log选项：在my.cnf配置文件中配置log-bin[=path for binary log]参数，在启动MySQL时使用–log-bin选项。<br>　　2. 创建一个全新的专用于复制的帐户，或者通过给一个现有帐户授予复制相关的权限。实现MySQL Replication仅仅只需要“REPLICATION SLAVE”权限即可。可以通过如下方式来创建这个用户：<br><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">CREATE</span> <span class="keyword">USER</span> <span class="string">'repl'</span>@<span class="string">'192.168.0.2'</span> <span class="keyword">IDENTIFIED</span> <span class="keyword">BY</span> <span class="string">'password'</span>;</span></span><br><span class="line"><span class="operator"><span class="keyword">GRANT</span> <span class="keyword">REPLICATION</span> <span class="keyword">SLAVE</span> <span class="keyword">ON</span> *.* <span class="keyword">TO</span> <span class="string">'repl'</span>@<span class="string">'192.168.0.2'</span>;</span></span><br></pre></td></tr></table></figure></p>
<p>　　3. 配置Slave：是通过CHANGE MASTER TO 命令来配置然后再启动Slave。</p>
<h2 id="master-master"><a href="#master-master" class="headerlink" title="master-master"></a>master-master</h2><p>　　有时候要停止Master端。为了尽可能减少写服务的停机时间，最佳的做法就是将Slave节点切换成Master来提供写入的服务。当原Master又可以正常提供服务的时候，需要重新搭建Replication环境，并以原Master作为Slave来对外提供读的服务。这样操作工作量太大，也容易出现错误<br>　　为了解决这个问题，可以搭建Dual Master环境，实际上就是两个MySQL互相将对方作为自己的Master，自己作为对方的Slave来进行复制。<br>　　在Binary Log中记录了当前MySQL的server-id，这个参数也是搭建MySQL Replication时必须明确指定，<strong>Master和Slave的server-id参数值需要不一致</strong>，此时MySQL 就很容易判断某个变更是从哪一个MySQL产生的，避免出现循环复制的情况。如果我们不<strong>打开Slave的Binary Log的选项</strong>（–log-slave-update），MySQL就不会记录复制过程中的变更到Binary Log中，就更不用担心可能会出现循环复制的情形了。<br>　　Dual Master环境，并不是为了让两端都提供写的服务。而是将其中一端开启写服务，另一端只是提供读服务，或者完全不提供任何服务，仅仅只是作为一个备用的机器存在。这样可以避免数据的冲突，防止造成数据的不一致性。因为即使在两边执行的修改有先后顺序，但由于Replication是异步的实现机制，同样会导致即使晚做的修改也可能会被早做的修改所覆盖，如下所示：</p>
<table>
<thead>
<tr>
<th style="text-align:left">时间点</th>
<th style="text-align:left">MySQL A</th>
<th style="text-align:left">MySQL B</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">1</td>
<td style="text-align:left">更新x表y记录为10</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">2</td>
<td style="text-align:left"></td>
<td style="text-align:left">更新x表y记录为20</td>
</tr>
<tr>
<td style="text-align:left">3</td>
<td style="text-align:left"></td>
<td style="text-align:left">获取到A日志，更新x表的y记录为1 0（不符合期望）</td>
</tr>
<tr>
<td style="text-align:left">4</td>
<td style="text-align:left">获取B日志，更新x表y记录为20（符合期望）</td>
</tr>
</tbody>
</table>
<p>　　这种情形下，不仅在B库上面的数据不是用户所期望的结果，A 和B两边的数据也出现了不一致。 可以通过特殊的约定，让某些表的写操作全部在一端，而另外一些表的写操作全部在另外一端，保证两端不会操作相同的表，这样就能避免上面问题的发生了。</p>
<h2 id="master-slaves-slaves"><a href="#master-slaves-slaves" class="headerlink" title="master-slaves-slaves"></a>master-slaves-slaves</h2><p>　　当系统读压力特别大的时候，一个Master需要许多的Slave才能够支撑。当master写的压力变大的时候，由于它连上来的Slave IO线程较多，导致复制消耗更多的资源，造成复制的延时。<br>　　此时可以在Slave端记录复制所产生变更的Binary Log信息的功能，也就是<strong>打开—log-slave-update选项</strong>。然后，通过二级或者更多级别复制来减少Master 端因为复制所带来的压力。也就是说，首先通过少数几台MySQL(第一级Slave)从Master来进行复制，然后其他的Slave再从第一级Slave 集群来进行复制。这样很容易就控制了每一台MySQL上面所附属Slave的数量。这种架构称之为Master - Slaves - Slaves 架构，如下图所示：<img src="/images/master-slaves-slaves.png" alt="Master - Slaves - Slaves"><br>　　当遇到这种情况的时候，建议通过拆分成多个Replication集群来解决上述瓶颈问题。增加复制的级联层次，同一个变更传到最底层的Slave 所需要经过的MySQL也会更多，造成延时较长的风险。当然，分拆集群也需要更复杂的技术和更复杂的应用系统架构。</p>
<h2 id="master-master-slaves"><a href="#master-master-slaves" class="headerlink" title="master-master-slaves"></a>master-master-slaves</h2><p>　　和Master - Slaves - Slaves 架构相比，只是将第一级Slave集群换成了一台单独的Master，作为备用Master，然后再从这个备用的Master 进行复制到一个Slave 集群。下面的图片更清晰的展示了这个架构的组成：<img src="/images/master-master-slaves.png" alt="master-master-slaves"><br>　　这种Dual Master 与级联复制结合的架构，最大的好处就是既可以<strong>避免主Master的写入操作不会受到Slave集群的复制所带来的影响</strong>，同时主Master 需要切换的时候也基本上不会出现重搭Replication 的情况。</p>
<h2 id="u7ECF_u9A8C_u5206_u4EAB"><a href="#u7ECF_u9A8C_u5206_u4EAB" class="headerlink" title="经验分享"></a>经验分享</h2><p>　　1. 当MySQL主从复制在 show slave status时出现Slave_IO_Running或Slave_SQL_Running 的值不为YES时，需要首先通过 stop slave 来停止从服务器，然后再执行一次<br>　　2. 一主多从的架构并不是最好的架构，通常比较优的做法是通过程序代码和中间件等方面来规划，比如设置对表数据的自增id值差异增长等方式来实现两个或多个主服务器，但一定要注意保证好这些主服务器数据的完整性，否则效果会比多个一主多从的架构还要差；</p>
<h2 id="u53C2_u8003_u94FE_u63A5"><a href="#u53C2_u8003_u94FE_u63A5" class="headerlink" title="参考链接"></a>参考链接</h2><p><a href="http://blog.jobbole.com/89140/" target="_blank" rel="external">http://blog.jobbole.com/89140/</a><br>利用Haproxy给MySQL Cluster做负载均衡：<a href="http://www.cnblogs.com/wang1988ming/archive/2012/10/24/2737507.html" target="_blank" rel="external">http://www.cnblogs.com/wang1988ming/archive/2012/10/24/2737507.html</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2016/01/22/database/5.mysql集群/" data-id="cijzzpvhd00gh1cfsobo41gzh" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/database/">database</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/01/22/database/6.mysql编译安装/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          mysql编译安装
        
      </div>
    </a>
  
  
    <a href="/2016/01/22/spring/5.spring综述/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">spring综述</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/cache/">cache</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a><span class="category-list-count">13</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/docker/">docker</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gis/">gis</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/go/">go</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gradle/">gradle</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/groovy/">groovy</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/hadoop/">hadoop</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/java/">java</a><span class="category-list-count">18</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/log/">log</a><span class="category-list-count">11</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mongodb/">mongodb</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mq/">mq</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mybatis/">mybatis</a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/netty/">netty</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nginx/">nginx</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nio/">nio</a><span class="category-list-count">19</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nodejs/">nodejs</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/redis/">redis</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/rpc/">rpc</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/spring/">spring</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/tomcat/">tomcat</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/zookeeper/">zookeeper</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/杂项/">杂项</a><span class="category-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/aop/">aop</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/aspectj/">aspectj</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/classloader/">classloader</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/common-loggings/">common-loggings</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/commonjs/">commonjs</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a><span class="tag-list-count">10</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/docker/">docker</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dubbo/">dubbo</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fastdfs/">fastdfs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gclib/">gclib</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/geohash/">geohash</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gis/">gis</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/go/">go</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gradle/">gradle</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovy/">groovy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hadoop/">hadoop</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hessisan/">hessisan</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a><span class="tag-list-count">48</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javassist/">javassist</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kafka/">kafka</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log/">log</a><span class="tag-list-count">11</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log4j/">log4j</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/logback/">logback</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/map/">map</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memecached/">memecached</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mina/">mina</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mongodb/">mongodb</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mq/">mq</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mqtt/">mqtt</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mybatis/">mybatis</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netty/">netty</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nginx/">nginx</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nio/">nio</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nodejs/">nodejs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/postgresql/">postgresql</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/proxy/">proxy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/push/">push</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rabbitmq/">rabbitmq</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/">redis</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rpc/">rpc</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sitemesh/">sitemesh</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sld/">sld</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/slf4j/">slf4j</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/socket/">socket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spatialite-for-android/">spatialite for android</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spi/">spi</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spring/">spring</a><span class="tag-list-count">13</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tomcat/">tomcat</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/transaction/">transaction</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/web/">web</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xSocket/">xSocket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zbus/">zbus</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zookeeper/">zookeeper</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据结构/">数据结构</a><span class="tag-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/aop/" style="font-size: 15.38px;">aop</a> <a href="/tags/aspectj/" style="font-size: 11.54px;">aspectj</a> <a href="/tags/cache/" style="font-size: 11.54px;">cache</a> <a href="/tags/classloader/" style="font-size: 10px;">classloader</a> <a href="/tags/common-loggings/" style="font-size: 10px;">common-loggings</a> <a href="/tags/commonjs/" style="font-size: 12.31px;">commonjs</a> <a href="/tags/database/" style="font-size: 16.92px;">database</a> <a href="/tags/docker/" style="font-size: 13.85px;">docker</a> <a href="/tags/dubbo/" style="font-size: 10px;">dubbo</a> <a href="/tags/fastdfs/" style="font-size: 10px;">fastdfs</a> <a href="/tags/gclib/" style="font-size: 10.77px;">gclib</a> <a href="/tags/geohash/" style="font-size: 10px;">geohash</a> <a href="/tags/gis/" style="font-size: 10px;">gis</a> <a href="/tags/git/" style="font-size: 10.77px;">git</a> <a href="/tags/go/" style="font-size: 10px;">go</a> <a href="/tags/gradle/" style="font-size: 10px;">gradle</a> <a href="/tags/groovy/" style="font-size: 10px;">groovy</a> <a href="/tags/hadoop/" style="font-size: 10px;">hadoop</a> <a href="/tags/hessisan/" style="font-size: 11.54px;">hessisan</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/javassist/" style="font-size: 10px;">javassist</a> <a href="/tags/kafka/" style="font-size: 11.54px;">kafka</a> <a href="/tags/linux/" style="font-size: 12.31px;">linux</a> <a href="/tags/log/" style="font-size: 17.69px;">log</a> <a href="/tags/log4j/" style="font-size: 12.31px;">log4j</a> <a href="/tags/logback/" style="font-size: 13.08px;">logback</a> <a href="/tags/map/" style="font-size: 10px;">map</a> <a href="/tags/memecached/" style="font-size: 10.77px;">memecached</a> <a href="/tags/mina/" style="font-size: 13.08px;">mina</a> <a href="/tags/mongodb/" style="font-size: 19.23px;">mongodb</a> <a href="/tags/mq/" style="font-size: 13.85px;">mq</a> <a href="/tags/mqtt/" style="font-size: 10.77px;">mqtt</a> <a href="/tags/mybatis/" style="font-size: 16.15px;">mybatis</a> <a href="/tags/netty/" style="font-size: 10px;">netty</a> <a href="/tags/nginx/" style="font-size: 11.54px;">nginx</a> <a href="/tags/nio/" style="font-size: 13.08px;">nio</a> <a href="/tags/nodejs/" style="font-size: 10px;">nodejs</a> <a href="/tags/postgresql/" style="font-size: 10.77px;">postgresql</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/proxy/" style="font-size: 10px;">proxy</a> <a href="/tags/push/" style="font-size: 10px;">push</a> <a href="/tags/rabbitmq/" style="font-size: 11.54px;">rabbitmq</a> <a href="/tags/redis/" style="font-size: 13.85px;">redis</a> <a href="/tags/rpc/" style="font-size: 19.23px;">rpc</a> <a href="/tags/sitemesh/" style="font-size: 10px;">sitemesh</a> <a href="/tags/sld/" style="font-size: 10px;">sld</a> <a href="/tags/slf4j/" style="font-size: 10px;">slf4j</a> <a href="/tags/socket/" style="font-size: 14.62px;">socket</a> <a href="/tags/spatialite-for-android/" style="font-size: 10px;">spatialite for android</a> <a href="/tags/spi/" style="font-size: 10px;">spi</a> <a href="/tags/spring/" style="font-size: 18.46px;">spring</a> <a href="/tags/tomcat/" style="font-size: 10.77px;">tomcat</a> <a href="/tags/transaction/" style="font-size: 10px;">transaction</a> <a href="/tags/web/" style="font-size: 10px;">web</a> <a href="/tags/xSocket/" style="font-size: 14.62px;">xSocket</a> <a href="/tags/zbus/" style="font-size: 10px;">zbus</a> <a href="/tags/zookeeper/" style="font-size: 10.77px;">zookeeper</a> <a href="/tags/数据结构/" style="font-size: 10.77px;">数据结构</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a><span class="archive-list-count">67</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">December 2015</a><span class="archive-list-count">81</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/01/30/资料/">(no title)</a>
          </li>
        
          <li>
            <a href="/2016/01/30/java/13.Classloader系列一/">ClassLoader系列一</a>
          </li>
        
          <li>
            <a href="/2016/01/29/hadoop/1.hadoop系列之源码编译/">hadoop系列一之源码编译</a>
          </li>
        
          <li>
            <a href="/2016/01/29/go/1.GO系列之入门/">Go系列一之入门</a>
          </li>
        
          <li>
            <a href="/2016/01/28/tomcat/2.tomcat性能优化/">tomcat性能优化</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="http://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

  </div>
</body>
</html>